<!-- Main content -->
<section class="" ng-init="getSingle()">
    <form ng-if="activedData" ng-class="{'submitted': submitted}" ng-submit="save()">

        <div class="row justify-content-md-center">
            <div class=" col-lg-8">

                <div class="card mb-4">
                    <h6 class="card-header">Create new configuration</h6>
                    <div class="card-body">

                        <div class="row">
                            <section class="col-lg-12">

                                <div class="row">
                                    <div class="col">
                                        <div class="form-group" ng-if="isAdmin">
                                            <label class="control-label">Category</label>
                                            <select class="btn custom-select" ng-model="activedData.category">
                                                <option ng-repeat="item in cates" ng-value="item">{{item}}</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col">
                                        <div class="form-group" ng-if="isAdmin">
                                            <label class="control-label">Type</label>
                                            <select ng-change="initEditors()" class="form-control mr-2"
                                                ng-model="activedData.property.dataType">
                                                <option ng-repeat="item in settings.dataTypes track by $index"
                                                    ng-value="item.value">{{item.name}}</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group" ng-if="isAdmin">
                                    <label class="control-label">Keyword</label>
                                    <input type="text" required class="form-control" ng-model="activedData.keyword">
                                </div>
                                <div class="form-group">
                                    <label class="control-label">Value</label>
                                    <module-form-editor data="activedData.property" field-title="activedData.title" input-class="mr-2">
                                </div>
                                <div class="form-group" ng-if="isAdmin">
                                    <label class="control-label">Description</label>
                                    <textarea type="text" class="form-control"
                                        ng-model="activedData.description"></textarea>
                                </div>

                            </section>
                        </div>
                    </div>
                </div>
            </div>

            <actions preview-url="activedData.fullPath" back-url="'/portal/configuration/list'" class="col-lg-4 mb-3">
            </actions>

        </div>
    </form>
</section>
<!-- /.content -->